home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-07-26 | 777 b | 37 lines | [TEXT/ttxt] |
- The "Define Word" button script:
-
- on hilited
- local theDoc, theWord, definition, n, done
-
- set theWord to the contents of textbox "DefineWord"
-
- if word is not "" then
-
- tell application "WebMiner"
- set theDoc to open "http://machaut.uchicago.edu/cgi-bin/WEBSTER.sh?WORD=" & theWord without displaying
- repeat while the complete of theDoc is false
- end repeat
-
- set n to 1
- set definition to ""
- set done to false
-
- repeat while done = false
- try
- set definition to definition & the contents of paragraph n of theDoc
- on error
- set done to true
- end try
- set n to n + 1
- end repeat
- close theDoc
- end tell
-
- set textbox "definition" to definition
- set the editable of textbox "definition" to true
-
- end if
-
- end hilited
-
-